/*
	File:		MessageSystem.h
	Author:		Ben Feldmann
	Purpose:	Handles messages sent in the game	
*/

#pragma once

#include <queue>
using std::queue;

//class Message;
#include "Message.h"


typedef void (*MESSAGEPROC)(Message*);


class MessageSystem 
{
private:
	queue<Message*> messages;
	MESSAGEPROC msgProc;

	//static MessageSystem* messageSystem;

	MessageSystem()	{msgProc = nullptr;}
	MessageSystem(MessageSystem& msg);
	MessageSystem& operator=(MessageSystem& msg);
	~MessageSystem() {}

public:
	static MessageSystem* GetInstance();

	void InitMessageSystem(MESSAGEPROC newMsgProc);

	void SendMsg(Message* newMsg);

	void ProcessMessages();

	void ClearMessages();

	void ShutdownMessageSystem();
};
